FROM centos:centos7.9.2009
# 创建一个www的系统用户
# 环境变量
ARG user=www
RUN groupadd --system --gid 1000 ${user} && adduser --system -g ${user}  --uid 1000 ${user}  -s /sbin/nologin
# 指定用户运行
USER ${user}
WORKDIR /data
# 复制到/data/htdocs
ADD htdocsbackup/www.idoseek.com-2022-07-23.tar.bz2 htdocs/
ADD optbackup/*bz2 /opt/
ADD sslbackup/*bz2 ssl/
ADD /root/backup/app_tar/* /usr/local/src/

# 安装nginx 启动
RUN yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel  \
&& cd /opt/nginx-1.18.0 && /opt/nginx-1.18.0/configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module \
&& make && make install && mkdir -p /data/logs/nginx && rm -f /opt/etc/nginx/vhosts/m.idoseek.com.conf && rm -rf /opt/webserver && rm -rf /opt/nginx-1.18.0



EXPOSE 80










